%% Performance Evaluation of EW UEP RLNC Coding Scheme (Plotter fct)
%
% Author: 12GR652
% Last modified: 26-04-2012
%
% Description:
% This script produces the figure based on the simulated data
%

%% Startup

% Clear workspace
close all
clear all
clc

%% Plotting

% Load data that has already been generated
load('ewrlnc_data')

% quick fix of x vector - must be the same sequence as in for-loop
nb_transmissions = 1:1:(3*gen_size);

% Suppress graphic output (better for terminal execution)
figure('visible','off');

% Fill plot with data
hold on
plot(nb_transmissions,I_prob,'-*','Color','black');
plot(nb_transmissions,P1_prob,'-o','Color','black');
plot(nb_transmissions,P2_prob,'-d','Color','black');
% plot(nb_transmissions,EEP_prob,'--','Color','black');
hold off

% Plot Annotation
xlabel('Received Packets [-]')
ylabel('Probability of Decoding [-]')
legend('I','P1','P2','EEP','location','SouthEast')
grid('on')
pbaspect([2.5 1 1])
set(gca,'XTick',0:10:3*gen_size)
xlim([0 3*gen_size])

% Save figure
print(gcf,filename_fig)






